package com.hj.response;

/**
 * @Description 响应
 * @author hj
 */
public class Resp<T> {

    /**
     * 默认成功
     */
    private int status;
    private String msg;
    private T data;

    public Resp() {
    }

    public Resp(RespInfo respInfo) {
        this.status = respInfo.getRespCode();
        this.msg = respInfo.getRespMsg();
    }

    public Resp(RespInfo respInfo, T data) {
        this.status = respInfo.getRespCode();
        this.msg = respInfo.getRespMsg();
        this.data = data;
    }


    public Resp(T data) {
        this.data = data;
    }

    public Resp(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
